import { createRouter, createWebHistory } from 'vue-router'
import layout from '../views/layout/index.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    //测试用
    {
      path: '/test', component: () => import('../views/test/test.vue'), name: 'test',
    },

    //登录注册
    {
      path: '/login', component: () => import('../views/login/login.vue'), name: 'login',
    },
    {
      path: '/register', component: () => import('../views/login/register.vue'), name: 'register',
    },

    //首页
    {
      path: '/', component: () => layout, name: '首页',
      children: [
        { path: '/', redirect: 'home' },
        { path: 'home', component: () => import('../views/home/home.vue'), name: 'home' }
      ]
    },

    //商城
    {
      path: '/shopmallpage', component: layout, name: '商城',
      children: [
        { path: 'shopmall', component: () => import('../views/shopmall/shopmall.vue'), name: 'shopmall' }
      ]
    },



    //消息
    {
      path: '/messagelistpage', component: layout, name: '消息',
      children: [
        { path: 'messagelist', component: () => import('../views/messagelist/messagelist.vue'), name: 'messagelist' }
      ]
    },

    //我的
    {
      path: '/minepage', component: layout, name: '我的',
      children: [
        { path: 'mine', component: () => import('../views/mine/mine.vue'), name: 'mine' }
      ]
    },
    //我的等级
    {
      path: "/minelevel", component: () => import("../views/mine/level/minelevel.vue"), name: "minelevel"
    },
    //我的积分
    {
      path: "/mineintegral", component: () => import("../views/mine/integral/mineintegral.vue"), name: "mineintegral"
    },
    //我的积分
    {
      path: "/mineintegral", component: () => import("../views/mine/integral/mineintegral.vue"), name: "mineintegral"
    },
    //我的收藏
    {
      path: "/minecollection", component: () => import("../views/mine/collection/collection.vue"), name: "minecollection"
    },
    //我的足迹，帖子，详情，日记，评价
    {
      path: "/minefootprint", component: () => import("../views/mine/littlehtml/footprint.vue"), name: "minefootprint"
    },
    {
      path: "/minecomments", component: () => import("../views/mine/littlehtml/comments.vue"), name: "minecomments"
    },
    {
      path: "/minetiwen", component: () => import("../views/mine/littlehtml/minetiwen.vue"), name: "minetiwen"
    },
    {
      path: "/minediaries", component: () => import("../views/mine/littlehtml/diaries.vue"), name: "minediaries"
    },
    {
      path: "/mineposts", component: () => import("../views/mine/littlehtml/posts.vue"), name: "mineposts"
    },
    //达人主页
    {
      path: '/minegoodman', component: () => import('../views/mine/goodman/minegoodman.vue'), name: '达人主页',
      children: [
        // { path: '/', redirect: "minegoodmanhome" },
        { path: 'minegoodmanhome', component: () => import('../views/mine/goodman/minegoodmanhome.vue'), name: 'minegoodmanhome' },
        { path: 'goodmanfollow', component: () => import('../views/mine/goodman/goodmanfollow.vue'), name: 'goodmanfollow' },
        { path: 'goodmanfans', component: () => import('../views/mine/goodman/goodmanfans.vue'), name: 'goodmanfans' },
      ]
    },
    //问题界面
    {
      path: '/question', component: () => import('../views/question/question.vue'), name: '问题界面',
      children: [
        { path: '/', redirect: "commonquestion" },
        { path: 'feedback', component: () => import('../views/question/feedback.vue'), name: 'feedback' },
        { path: 'commonquestion', component: () => import('../views/question/commonquestion.vue'), name: 'commonquestion' },
      ]
    },

    //变美说
    {
      path: '/bebeautifulpage', component: layout, name: '变美说',
      children: [
        { path: 'bebeautiful', component: () => import('../views/bebeautiful/bebeautiful.vue'), name: 'bebeautiful' }
      ]
    },
    //发布帖子、新建日记本、关联订单、写日记、提问题
    { path: '/lbpostposts', component: () => import('../views/bebeautiful/littlehtml/postposts.vue'), name: 'lbpostposts' },
    { path: '/lbcreatediary', component: () => import('../views/bebeautiful/littlehtml/creatediary.vue'), name: 'lbcreatediary' },
    { path: '/lbassociateorders', component: () => import('../views/bebeautiful/littlehtml/associateorders.vue'), name: 'lbassociateorders' },
    { path: '/lbwritediary', component: () => import('../views/bebeautiful/littlehtml/writediary.vue'), name: 'lbwritediary' },
    { path: '/lbandaskquestions', component: () => import('../views/bebeautiful/littlehtml/andaskquestions.vue'), name: 'lbandaskquestions' },

    //搜索
    {
      path: '/searchpage', component: () => import('../views/searchpage/search.vue'), name: 'search',
      children: [
        { path: '/', redirect: 'searchclick' },
        { path: 'searchclick', component: () => import('../views/searchpage/searchclick.vue'), name: 'searchclick' },
        { path: 'searchresult', component: () => import('../views/searchpage/searchresult.vue'), name: 'searchresult' },
      ]
    },

    //分类
    {
      path: '/category', component: () => import('../views/category/category.vue'), name: 'category',
    },

    //秒杀
    {
      path: '/limit', component: () => import('../views/limit/limit.vue'), name: 'limit',
    },

    //购物车
    {
      path: '/shopcar', component: () => import('../views/shopcar/shopcar.vue'), name: 'shopcar',
    },
    {
      path: '/shopcarOrder', component: () => import('../views/shopcar/shopcarOrder.vue'), name: 'shopcarOrder',
    },
    {
      path: '/shopCashier', component: () => import('../views/shopcar/shopCashier.vue'), name: 'shopCashier',
    },
    {
      path: '/shopSuccess', component: () => import('../views/shopcar/shopSuccess.vue'), name: 'shopSuccess',
    },

    //详情页
    {
      path: '/shopdetails', component: () => import('../views/Details/shopdetails.vue'), name: 'shopdetails',
    },
    {
      path: '/answerdetails', component: () => import('../views/Details/answerdetails.vue'), name: 'answerdetails',
    },
    {
      path: '/diarydetails', component: () => import('../views/Details/diarydetails.vue'), name: 'diarydetails',
    },
    {
      path: '/popularizationdetails', component: () => import('../views/Details/popularizationdetails.vue'), name: 'popularizationdetails',
    },
    // {
    //   path: '/questiondetail', component: () => import('../views/Details/questiondetail.vue'), name: 'questiondetail',
    // },

    //医生
    {
      path: '/DoctorList', component: () => import('../views/shopmall/Lists/DoctorList/DoctorList.vue'), name: 'DoctorList',
    },
    {
      path: '/DoctorHome', component: () => import('../views/shopmall/Lists/DoctorList/DoctorHome.vue'), name: 'DoctorHome',
    },
    //医院
    {
      path: '/HospitalList', component: () => import('../views/shopmall/Lists/HospitalList/HospitalList.vue'), name: 'HospitalList',
    },
    {
      path: '/HospitalHome', component: () => import('../views/shopmall/Lists/HospitalList/HospitalHome.vue'), name: 'HospitalHome',
    },
    //口碑榜
    {
      path: '/publicPraiseList', component: () => import('../views/shopmall/Lists/publicPraiseList/publicPraiseList.vue'), name: 'publicPraiseList',
    },

    //选择城市
    {
      path: '/selectcitys', component: () => import('../views/selectcitys/selectcitys.vue'), name: 'selectcitys',
    },

    //聊天
    {
      path: '/chat', component: () => import('../views/chat/chat.vue'), name: 'chat',
    },

    //会员
    {
      path: '/member', component: () => import('../views/mine/member/member.vue'), name: 'member',
    },
    {
      path: '/memberCashier', component: () => import('../views/mine/member/memberCashier.vue'), name: 'memberCashier',
    },
    {
      path: '/membercenter', component: () => import('../views/mine/member/membercenter.vue'), name: 'membercenter',
    },

    //订单列表 order---list
    //商城
    {
      path: '/orderlist', component: () => import('../views/orderlist/orderlistpage.vue'), name: '订单列表',
      children: [
        // { path: '/', redirect: 'home' },
        { path: '/', redirect: 'orderlisthome' },
        { path: 'orderlisthome', component: () => import('../views/orderlist/orderlisthome.vue'), name: 'orderlisthome' },
        { path: 'orderlistoperation1', component: () => import('../views/orderlist/orderlistoperation1.vue'), name: 'orderlistoperation1' },
        { path: 'orderlistoperation2', component: () => import('../views/orderlist/orderlistoperation2.vue'), name: 'orderlistoperation2' },
        { path: 'orderlistoperation3', component: () => import('../views/orderlist/orderlistoperation3.vue'), name: 'orderlistoperation3' },
        { path: 'orderlistoperation4', component: () => import('../views/orderlist/orderlistoperation4.vue'), name: 'orderlistoperation4' },
        { path: 'orderlistoperation5', component: () => import('../views/orderlist/orderlistoperation5.vue'), name: 'orderlistoperation5' },
        { path: 'orderlistrefund', component: () => import('../views/orderlist/orderlistrefund.vue'), name: 'orderlistrefund' },
        { path: 'fefunddetail', component: () => import('../views/orderlist/fefunddetail.vue'), name: 'fefunddetail' }

      ]
    },

    //设置
    {
      path: '/minesettings', component: () => import('../views/settings/minesettings.vue'), name: 'minesettings',
    },

    //变美日记
    {
      path: '/beautifuldiary', component: () => import('../views/mine/littlehtml/beautifuldiary.vue'), name: 'beautifuldiary',
    }


  ]
})

export default router
